#! user/bin/python
# -*- coding: utf-8 -*-

"""
Created on 2021/8/20 12:14

@File: main.py
@Author: LT
@Description: 调用A.B.C的入口程序
"""
import os
import sys
import pprint

# ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓加上这一句就和unittest一样可以直接运行了
sys.path.append(os.path.dirname(os.path.dirname(__file__)))		# 这是顶级包所在的目录的绝对路径
# ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑

__package__ = os.path.dirname(__file__).split("\\")[-1]
# __package__ = 'project_1'         # 如果存在，相对导入将基于此属性而不是模块__name__属性。

print(f"\n\n\npackage is--->{__package__}    file name in package is--->{__name__}\n\n\n")

# 下面两个都是可以的
from .A.B import C
# from project_1.A.B import C
